<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/common/taglib.jsp" %>
<!DOCTYPE html>
<html lang="ko">
<head>
<title> 한국의 논매기 소리 </title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta charset="utf-8">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link href="/css/reset.css" type="text/css" rel="stylesheet" />
<link href="/css/common.css" type="text/css" rel="stylesheet" />
<link href="/css/layout.css" type="text/css" rel="stylesheet" />
<link href="/css/ui.css" type="text/css" rel="stylesheet" />
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery-ui-1.10.4.custom.min.js" type="text/javascript"></script>
<!--script src="/js/gnb.min.js" type="text/javascript"></script-->
<script src="/js/gnb_ui.js" type="text/javascript"></script>
<script src="/js/left_menu.js" type="text/javascript"></script>
<script src="/js/ui.js" type="text/javascript"></script>
<script type="text/javascript">
//댑스별 메뉴 활성화
var navCurrentParam1 = ${searchVO.boardId};//1depth
var navCurrentParam2 = 0;//2depth
var navCurrentParam3 = 0;//3depth

$(document).ready(function() {
	
});

//상세폼
function viewForm(boardId, contentsInfoId){
	window.location.href="/board/contentsView.do?boardId="+boardId+"&contentsGroupId="+contentsInfoId;
}

function fncSave() {
	window.location.href="/admin/contentsForm.do?boardId=${searchVO.boardId}";
}

function fncPage(page) {
	var frm = document.searchVO; 
	frm.page.value = page;
	frm.submit();
}
</script>
<c:set var="navCurrentParam1" value="${searchVO.boardId}" scope="request" />
</head>
<body>
<form:form commandName="searchVO" name="searchVO" action="/board/contentsList.do" method="get">
	<form:hidden path="boardId"/>
	<form:hidden path="searchType"/>
	<form:hidden path="searchWord"/>
	<form:hidden path="page"/>			
</form:form>
<div class="Layerpop"></div>
<div id="nahfWrap">
	<!-- Header -->
	<jsp:include page="../common/header.jsp"></jsp:include>
	<!--// Header -->
	<!-- 컨텐츠 -->
	<div id="container" class="bg_sub">
		<div class="sub_wrap">
			<!-- 내용영역 -->
			<div class="sub_content">
				<div class="left_menu">
					<h2><img src="/img/leftMenu6.png" alt="시청각자료"/></h2>
					<!-- left 메뉴 -->
					<div id="left">
						<ul class="navmenu navmenu6">
							<li class="nvparam1"><a href="/board/contentsList.do?boardId=1">추천 컨텐츠</a></li>
							<li class="nvparam2"><a href="/board/contentsList.do?boardId=2">지역정보</a></li>
						</ul>
					</div>
					<!-- //left 메뉴 -->
				</div>
				<div class="sub_area">
					<!-- 서브 네비게이션 -->
					<ul class="sub_navi">
						<li><a href="/"><img src="/img/sub_navi1.gif" alt="home"/></a></li>
						<li><a href="#">시청각 자료</a></li>
						<li class="sel_navi"><a href="#">${boardInfo.boardNm }</a></li>
					</ul>
					<!-- //서브 네비게이션 -->
					<div class="sub_tit">
						<h3><img src="/img/subMenu_tit0${boardInfo.boardId }.gif" alt="${boardInfo.boardNm }"/></h3>
					</div>
					
					<!-- 리스트 검색창 -->
					<div class="ary_box">
						<div class="ary_left">
							<p>총 게시물 ${listResult.listCount}건 <em>[${paginationInfo.currentPageNo}/${paginationInfo.lastPageNoOnPageList} 페이지]</em></p>
						</div>
						<div class="ary_right">
							<select name="keywordType" title="선택해주세요" id="keywordType">
								<option value="01" selected="selected">제목</option>
								<option value="03">내용</option>
							</select>
							<input type="text" class="it " title="내용을 입력하세요" value="" name="keyword" id="keyword" style="width:164px;"/>
							<input type="button" value="결과내재검색" class="btn_listSch" id="searchButton"/>
						</div>
					</div>
					<!-- //리스트 검색창 -->
					<!-- 리스트 목록 -->
					<div class="tb_list">
						<table>
							<colgroup>
								<col style="width:70px;"/><col style="width:629px;"/>
							</colgroup>
							<thead>
								<tr>
									<th>번호</th>
									<th>내용</th>
								</tr>
							</thead>
							<tbody>
								<c:if test="${listResult.listCount eq 0}">
									<td colspan="2" style="text-align: center;">등록된 내용이 없습니다.</td>
								</c:if>
								<c:forEach varStatus="counter" var="contentsInfo" items="${listResult.list}">
								<tr>
									<td>${listResult.listCount - counter.index }</td>
									<td class="t_left">
										<div class="sub_album">
											<div class="sub_thumb_img">
												<c:choose>
													<c:when test="${contentsInfo.titleImageSeq ne 0 }">
													<img src="<c:url value='/download.do'/>?contentsId=${contentsInfo.contentsGroupId}_${contentsInfo.contentsSeq}&attachFileSeq=${contentsInfo.titleImageSeq}&thumbnail=true" style="width:123px; height:78px;" alt="이미지"/>
													</c:when>
													<c:otherwise>
													<img src="/img/sub_default.jpg" style="width:123px; height:78px;" alt="이미지"/>
													</c:otherwise>
												</c:choose>
											</div>
											<div class="sub_thumb_tx">
												<h3><a href="javascript:viewForm('${contentsInfo.boardId}','${contentsInfo.contentsGroupId}')" style="width:329px;">${contentsInfo.contentsNm}</a></h3>
												<p class="ellip_tx" style="width:504px;"><span>${contentsInfo.contentsDesc}</span></p>
											</div>
										</div>
									</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
					<c:if test="${loginChk}">
					<div class="btn_area">
							<div class="t_right">
								<a href="javascript:fncSave()" class="btn_list_view"><span>글쓰기</span></a>
							</div>
						</div>
					</c:if>
					<!-- //리스트 목록 -->
					<!-- 페이지 네비게이션 -->
					<div class="paginate_box">
						<div class="paginate_complex paginate_complex1">
							<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fncPage" />
							<input type="hidden" name="page" id="currentPage" />
						</div>
					</div>
					<!-- //페이지 네비게이션 -->
				</div>
			</div>
			<!-- //내용영역 -->
		</div>
	</div>
	<!-- //컨텐츠 -->
	<!-- 하단 -->
	<jsp:include page="../common/footer.jsp"></jsp:include>
	<!-- //하단 -->
</div>
<script type="text/javascript">
//<![CDATA[
(function ($) {
	$(document).ready(function() {
		$('.search').schSelect();
		//gnb 메뉴
		navigation("gnb_wrap", "slide");
		
		$( "#keyword" ).keypress(function( event ) {
			  if ( event.which == 13 ) {
				  searchWithinResults();
			  }
		});
		
		$( "#searchButton" ).click(function( event ) {
			searchWithinResults();
		});

	});
}(jQuery));
//]]>
</script>
</body>
</html>